<ul class="nav nav-secondary">
	<li class="active"><a href="#/competition_add">当前比赛</a></li>
 	<li ><a href="#/competition_old">历史记录</a></li>
</ul>
<div class="pull-right">
    <a href="#/competition_add"><button type="button" class="btn btn-primary">创建比赛</button></a>
</div>		
<table class="table datatable">
    <thead>
	    <tr>
	    	<th>序号</th>
	    	<th>名称</th>
	    	<th>地点</th>
	    	<th>报名截止日期</th>			    	
	    	<th>比赛开始日期</th>
	    	<th>比赛结束日期</th>
	    	<th>操作</th>		    	
	    </tr>
  	</thead>
  	<tbody>
	    <tr ng-repeat="competition in competitions">
	    	<td>{{$index+1}}</td>
	    	<td>{{competition.name}}</td>
	    	<td>{{competition.place}}</td>
	    	<td>{{competition.reg_end_time}}</td>
	    	<td>{{competition.start_time}}</td>
	    	<td>{{competition.end_time}}</td>
	    	<td >
	    		<button ng-show="!competition.is_published" ng-click="open(competition)" class="btn btn-success">开放报名</button>
	    		<button ng-show="competition.is_published" class="btn btn-danger disabled">截止报名</button>
	    		<a href="#/competition_new/{{competition.id}}"><button  class="icon-pencil btn btn-default" style="color:#3280FC"></button></a>
	    	</td>
	    </tr>
  	</tbody>
</table>
<ul class="pager" style="margin-left:25%">
    <li class="previous"><a href="#">« 上一页</a></li>
    <li><a href="#">1</a></li>
    <li><a href="#">2</a></li>
    <li class="active"><a href="#">3</a></li>
    <li><a href="#">4</a></li>
    <li><a href="#">5</a></li>
    <li><a href="###" data-toggle="pager" data-placement="top">...</a></li>
    <li><a href="#">10</a></li>
    <li class="next"><a href="#">下一页 »</a></li>
 </ul>

